#define _CRT_SECURE_NO_WARNINGS 1
#include<stdio.h>
int main()
{
	int x = 0;
	scanf("%d", &x);
	int t = x;
	int mask = 1;
	while (t > 9) {
		t /= 10;
		mask *= 10;
	}
	do {
		int a = x / mask;
		printf("%d", a);
		if (mask > 9) {
			printf(" ");
		}
		x %= mask;
		mask /= 10;
	} while (mask > 0);
	printf("\n");
	return 0;
}